package com.efast.cafe.commponent.es.socketio.base;

import java.util.HashMap;

import com.efast.cafe.commponent.log.ext.CafeLogger;
import com.efast.cafe.commponent.log.ext.CafeLoggerFactory;
/**
 * 继承此类 并加上注解 @SocketIOAlarm
 * @author Administrator
 *
 */
public abstract class AbstractSocketAlarm {
	
	public CafeLogger logger = CafeLoggerFactory.getLogger(getClass());
	
	
	/**
	 * {socketio.alarm.disconnect_frequency}分钟内掉线次数超过{socketio.alarm.single_disconnect_timer}次的设备
	 * @param socketInstant 当前长连接启动的服务器IP
	 * @param uids 设备ID对应掉线次数
	 */
	public abstract void disconnectAlarm(String socketInstant,HashMap<String,Integer> uids);
	
	/**
	 * {socketio.alarm.disconnect_frequency}分钟内所有设备掉线超过{socketio.alarm.all_disconnect_timer}次告警
	 * @param socketInstant 当前长连接启动的服务器IP
	 * @param disconnectCounter 掉线次数
	 */
	public abstract void disconnectAllAlarm(String socketInstant,Integer disconnectCounter);
}
